From 22aca8952fbbc13490fd9ab0263894bbbfd897e5 Mon Sep 17 00:00:00 2001 From: Corey Berla Date: Fri, 21 Oct 2022 13:53:49 -0700 Subject: [PATCH] filechoosercell: Select item when right click or long press --- gtk/gtkfilechoosercell.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/gtk/gtkfilechoosercell.c b/gtk/gtkfilechoosercell.c index 267b9511e3..c14ae0a021 100644 --- a/gtk/gtkfilechoosercell.c +++ b/gtk/gtkfilechoosercell.c @@ -67,11 +67,15 @@ popup_menu (GtkFileChooserCell *self, double y) { GtkWidget *widget = GTK_WIDGET (self); + GtkSelectionModel *model; GtkWidget *impl; double xx, yy; impl = gtk_widget_get_ancestor (widget, GTK_TYPE_FILE_CHOOSER_WIDGET); + model = gtk_file_chooser_widget_get_selection_model (GTK_FILE_CHOOSER_WIDGET (impl)); + gtk_selection_model_select_item (model, self->position, TRUE); + gtk_widget_translate_coordinates (widget, GTK_WIDGET (impl), x, y, &xx, &yy); -- 2.30.2